package com.hwd.gmall.oauth.feign;

import com.hwd.gmall.oauth.feign.util.AuthToken;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 认证微服务的feign接口
 *
 * @author 黄伟东/Victor
 * @date 2022/5/9 23:59
 */
@FeignClient(name = "service-oauth", path = "/user/login", contextId = "oauthFeignClient")
public interface OauthFeignClient {

    /**
     * 自定义登录
     *
     * @param username 用户名
     * @param password 密码
     * @return com.hwd.gmall.oauth.feign.util.AuthToken
     */
    @GetMapping
    AuthToken login(@RequestParam("username") String username, @RequestParam("password") String password);
}
